import CryptoJS from 'crypto-js'
import { md5Key } from "@/config";

let md5AgainKey = "ABC123";
let md5PhoneKey = "XZZ987";


export function md5(phone,time) {
    let md5KeyStr = CryptoJS.MD5(md5Key).toString() + md5AgainKey;
    let md5PhoneStr = CryptoJS.MD5(phone).toString() + md5PhoneKey
    md5KeyStr = CryptoJS.MD5(md5KeyStr).toString()
    md5PhoneStr = CryptoJS.MD5(md5PhoneStr).toString()
    let md5Val = md5KeyStr + md5PhoneStr
    md5Val = CryptoJS.MD5(md5Val+time).toString()

    return md5Val;
}